/**
  * Author: Mei
  * Date: 2020-12-30 19:13
  * Description: 测试传入多参数  查看执行次数
  *
  */
#include "../head.h"
#include <cassert>
#include<limits>

template<typename T>
void print(T t) {
    cout << t << endl;
}

template<typename T, typename ...Args>
void print(T t, Args...args) {
    cout << t << endl;
    print(args...);
}

//获取tuple的索引
template<int...>
struct TupleIndex {
};
namespace ss {
    template<size_t N, typename T1, typename T2>
    using pair_type = pair<typename tuple_element<N, T1>::type, typename tuple_element<N, T2>::type>;

    template<int N>
    int pair() {
        cout << N << endl;
        return N;
    }

    //template<size_t N>
    //int pair() {
    //    cout << "exec: N = " << N << endl;
    //    return N;
    //    //return make_pair(get<N>(tup1), get<N>(tup2));
    //};
}
template<int ...Args>
void exec(TupleIndex<Args...>&)
//-> decltype(make_tuple(ss::pair<Args>()...))
{
    cout << "exec: sizeof: "<< sizeof...(Args) << endl;
    //print(args...);
    make_tuple(ss::pair<Args>()...);
}

int main() {
    TupleIndex<4, 3, 2, 4, 1> ti;
    exec(ti);

    shared_ptr<int> sp(new int[8], [](int *p) {delete[] p;});

    return 0;
}